<html>
<head>
    <title></title>
    <script type="text/javascript" src="https://code.jquery.com/jquery-3.4.1.min.js"></script>
    <script>
        $(document).ready(function() {
            $.getJSON('info').done(function(data) {
                $('#info pre').text(JSON.stringify(data, null, 4));
                $('input[name="rust_log"]').val(data.rust_log);
                $('#name, head > title').text(data.name + ': ' + data.id);
            }).fail(function() {
                alert('failed getting node info');
            });
        });
    </script>
</head>
<body>
    <div style="border: 1px solid #000; padding: 2px;">
        <h1><span id="name">Loading...</span></h1>
    </div>

    <br><br>

    <div style="border: 1px solid #000; padding: 2px;" id="info">
        <pre>
            Loading info...
        </pre>
    </div>

    <br><br>

    <div style="border: 1px solid #000; padding: 2px;">
        <strong>Set log level</strong>
        <form action="set-rust-log" method="POST">
            <input type=text" name="rust_log" value="" size="100">
            <input type="submit" value="Set">
        </form>
    </div>
</body>
</html>
